<?php

namespace app\admin\validate;
use think\Validate;


class Featured extends Validate {
    protected  $rule = [
        ['title' , 'require|max:30' , '标题不能为空|标题名称不能超过30个字符'],
        ['image', 'require', '必须上传图片'],
        ['type', 'require', '必须选择分类'],
        ['url', 'url', '请输入正确的url网址'],
        ['description', 'require'],
    ];

    /**
     * 场景设置
     */
    protected $scene = [
        'status' => ['id', 'status'],//修改状态
    ];
}